<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学习伴侣 - 你的AI学习助手</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <header>
            <h1>🎓 学习伴侣</h1>
            <p>你的专属AI学习助手</p>
        </header>

        <div class="function-selector">
            <button class="func-btn active" data-func="explain">概念解释</button>
            <button class="func-btn" data-func="answer">问题解答</button>
            <button class="func-btn" data-func="summarize">知识总结</button>
        </div>

        <div class="input-area">
            <textarea id="user-input" placeholder="请输入你想要理解的概念、问题或需要总结的内容..."></textarea>
            <button id="submit-btn">开始分析</button>
        </div>

        <div class="result-area">
            <div id="loading" class="hidden">
                <div class="loading-spinner"></div>
                <p>AI正在思考中...</p>
            </div>
            <div id="ai-response" class="hidden"></div>
        </div>
    </div>

    <script src="script.js"></script>
</body>
</html>